package com.tnr.dao;

import java.util.List;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.tnr.dto.EmployeeDto;
import com.tnr.model.Employee;

//@Mapper
public interface EmployeeDao {

	//@Select("select * from employee")
	List<Employee> findEmployeeList(EmployeeDto dto);

	int deleteEmployeesByIds(@Param("ids") String... eids);

	@Insert("insert into employee(e_name,e_date,e_sal) values(#{e_name},#{e_date},#{e_sal})")
	int saveEmployees(EmployeeDto dto);

	@Update("update employee set e_name=#{e_name},e_date=#{e_date},e_sal=#{e_sal}  where e_id = #{e_id}")
	int updateEmployees(EmployeeDto dto);

}
